package com.sbc.database.handler;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.sbc.distributed_id.toolkit.SnowflakeIdUtil;

/**
 * @description: 自定义雪花算法生成器
 * @author: songbaicheng
 * @create: 2024-03-21 20:25
 **/
public class CustomIdGenerator implements IdentifierGenerator {

    @Override
    public Number nextId(Object entity) {
        return SnowflakeIdUtil.nextId();
    }
}
